﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MetaCollection.ContentService.Http
{
	/// <summary>
	/// 3xx Redirection
	/// ------------------------------------
	/// The client must take additional action to complete the request. This class of status code indicates that further
	/// action needs to be taken by the user agent in order to fulfil the request. The action required may be carried out
	/// by the user agent without interaction with the user if and only if the method used in the second request is GET or
	/// HEAD. A user agent should not automatically redirect a request more than five times, since such redirections usually
	/// indicate an infinite loop.	/// </summary>
	public enum RedirectStatus
	{
		None = 0,
		/// <summary>
		/// Indicates multiple options for the resource that the client may follow. It, for instance, could be used to
		/// present different format options for video, list files with different extensions, or word sense disambiguation.
		/// </summary>
		MultipleChoices = 300,
		/// <summary>
		/// This and all future requests should be directed to the given URI.
		/// </summary>
		MovedPermanently = 301,
		/// <summary>
		/// This is the most popular redirect code, but also an example of industrial practice contradicting the standard.
		/// HTTP/1.0 specification (RFC 1945 ) required the client to perform a temporary redirect (the original describing
		/// phrase was "Moved Temporarily"), but popular browsers implemented it as a 303 See Other. Therefore, HTTP/1.1
		/// added status codes 303 and 307 to disambiguate between the two behaviours. However, the majority of Web
		/// applications and frameworks still use the 302 status code as if it were the 303.
		/// </summary>
		Found = 302,
		/// <summary>
		/// The response to the request can be found under another URI using a GET method. When received in response to a PUT,
		/// it should be assumed that the server has received the data and the redirect should be issued with a separate
		/// GET message. (since HTTP/1.1)
		/// </summary>
		SeeOther = 303,
		/// <summary>
		/// Indicates the resource has not been modified since last requested. Typically, the HTTP client provides a header
		/// like the If-Modified-Since header to provide a time against which to compare. Utilizing this saves bandwidth and
		/// reprocessing on both the server and client, as only the header data must be sent and received in comparison to the
		/// entirety of the page being re-processed by the server, then resent using more bandwidth of the server and client.
		/// </summary>
		NotModified = 304,
		/// <summary>
		/// Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status
		/// code, primarily for security reasons. (since HTTP/1.1)
		/// </summary>
		UseProxy = 305,
		/// <summary>
		/// No longer used.
		/// </summary>
		[Obsolete("No Longer Used")]
		SwitchProxy = 306,
		/// <summary>
		/// In this occasion, the request should be repeated with another URI, but future requests can still use the original
		/// URI. In contrast to 303, the request method should not be changed when reissuing the original request. For
		/// instance, a POST request must be repeated using another POST request. (since HTTP/1.1)
		/// </summary>
		TemporaryRedirect = 307
	}
}
